package org.csu.forum.domain.VO;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import org.csu.forum.domain.PO.Files;
import org.csu.forum.domain.PO.Followpost;
import org.csu.forum.domain.PO.Post;
import org.springframework.stereotype.Component;

@Component
@Data
public class FollowPostVO {
    @JsonIgnore
    private Files files;
    @JsonIgnore
    private Post post;
    @JsonIgnore
    private Followpost followpost;

    private int fileid;
    private String fileDescription;
    private String file_src;

    private int postid;
    private String content;
    private int zoneid;

    private int titlepostId;
    private int followpostFloor;

    public FollowPostVO(){
        this.files = new Files();
        this.post = new Post();
        this.followpost = new Followpost();
    }



    public Followpost getFollowpost() {
        return followpost;
    }

    public void setFollowpost(Followpost followpost) {
        this.followpost = followpost;
    }

    public Post getPost() {
        return post;
    }

    public void setPost(Post post) {
        this.post = post;
    }

    public Files getFiles() {
        return files;
    }

    public void setFiles(Files files) {
        this.files = files;
    }

    public void setPatameter(){
//        this.file.setFileId(this.fileid);
//        this.file.setFilesrc(this.file_src);
//        this.file.setFileDescription(this.fileDescription);

        this.fileid = this.files.getFileId();
        this.file_src = this.files.getFilesrc();
        this.fileDescription = this.files.getFileDescription();

//        this.post.setPostid(this.postid);
//        this.post.setContent(this.content);
//        this.post.setFileid(this.fileid);
//        this.post.setZoneid(this.zoneid);

        this.postid = this.post.getPostid();
        this.content = this.post.getContent();
        this.zoneid = this.post.getZoneid();

//        this.followpost.setFollowpostFloor(this.followpostFloor);
//        this.followpost.setTitlepostId(this.titlepostId);
//        this.followpost.setFollowpostId(this.postid);
        this.titlepostId = this.followpost.getTitlepostId();
        this.followpostFloor = this.followpost.getFollowpostFloor();
    }
}
